<template>
    <div class="header">
        <van-icon name="arrow-left" @click="back"/>
        <slot name="title">标题</slot>
        <van-icon name="ellipsis" />
    </div>
</template>

<script setup>
const back = () => {
    history.back()
}
</script>

<style scoped>
.header {
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(to bottom, #0066ff 30%, #00aeff 80%);
}
</style>